<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"
    import="org.oexam.ostudy.facade.struct.LoggedUserDetails"
    import="org.oexam.ostudy.facade.struct.AdminList"
    import="org.oexam.ostudy.struct.Administrators" import="java.util.List"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>View Administrators</title>
<style type="text/css">
body {
	background-color: silver;
}

menu {
	border-style: solid;
	border-color: black;
	min-width: 700px
	min-height: 700px
}
</style>
</head>
<body>

	<table style="table-layout: auto; min-width: 700px;">
		<tr bgcolor="gray">
			<td colspan="2"><img src="University.gif"
				style="width: 90px; height: 35px" alt="No Image">
				<h1
					style="font-family: cursive; azimuth: left-side; color: #63382E;">
					EXAMPLE UNIVERSITY</h1> <span
				style="font-stretch: ultra-expanded; color: #63382E; font-family: cursive;">
					University Examination and Learning system </span></td>
			<td style="table-layout: auto; min-width: 100px;">
			<%LoggedUserDetails loggedUserDetails = (LoggedUserDetails)session.getAttribute("userLoginDetails"); %>
			Logged in as, <%= loggedUserDetails.getUserName() %>.
			<br>
			<a href="Logout">logout</a>
			</td>
			
			
		</tr>


		<tr valign="top" style="height: 800px">



			<td style="width: 800px; height:500px" bordercolor="black" >
			<br>
					<% 
			if((session.getAttribute("message")!=null)){
				%> <%= (String) session.getAttribute("message")
						%> <%session.setAttribute("message", null);
			}
			%>
			<br>
			<br>
			
			
			<% AdminList list =  (AdminList)session.getAttribute("adminList");
		        List<Administrators> adminList = list.getAdminList(); 
		     %>
		     <table border="1">
		     <%for (Administrators admin : adminList ) {
		    	 String name = admin.getFirst_name() + " " + admin.getLast_name();
		    	 String id   = Integer.toString(admin.getAdmin_id());
		     %>
		     
		    
					
		
		     <tr>
						<td><%=name%></td>
						<td><a href="ShowAdministrator?&id=<%=id%>"> View</a></td>
			</tr>
		        
		    	 
		     <%	 
		     }%>
		     
		     </table>
		     <%session.setAttribute("adminList", null); %>
		
			
			</td>
			<td style="height: auto; width: auto; text-align: top;">
	
			</td>
		</tr>

		<tr>
			<td colspan="3"
				style="background-color: #FFA513; text-align: center;">
				Copyright © 2011 www.exampleuniversity.com. All rights reserved.</td>
		</tr>
	</table>

</body>


</html>